﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace Yto.Common.Dependency
{
    public interface ICtnRegister
    {
        void RegistAssembly(Assembly assembly);

        void RegistAssembly(Assembly assembly, RegistrationCfg config);

        bool IsRegisted(Type type);

        bool IsRegisted<T>();

        void Regist(Type type, RegisterLifeStyle lifeStyle = RegisterLifeStyle.Singleton);

        void Regist(Type type, Type implementType, RegisterLifeStyle lifeStyle = RegisterLifeStyle.Singleton);

        void AddRegister(IBasicRegister basicRegister);

        void Regist<T, TI>(RegisterLifeStyle lifeStyle = RegisterLifeStyle.Singleton)
            where T : class
            where TI : class, T;
    }
}
